<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>原型练习</title>
</head>
<body>
    
</body>
<script>
    var tao;
(function(){
    function Stu(na,age){
        this.name=na;
        this.age=age;
        this.hi=function(){
            console.log("我叫:"+this.name+"年龄:"+this.age);
        }
    }
    tao=new Stu("涛",18);
})()
tao.hi();
tao.__proto__.game=function(){
    alert(this.name+"玩游戏.....");
}
console.log(tao.constructor)
tao.constructor.prototype.game2=function(){
    alert(this.name+"玩第二个游戏");
}
tao.game()
tao.game2()
//测试git上传是否ok
</script>
</html>